package yangcheng.second;

abstract class Employee implements SalaryCalculator{
    String name;
    double salary;
    int year;

    public void work(){}

}
class Worker extends Employee {
    public Worker() {}
    public Worker(String name, int year, double salary) {
        this.name = name;
        this.salary = salary;
        this.year = year;
    }

    @Override
    public double addSalary() {
        return (salary*1.1)+(year*100)-salary;
    }
    public void work() {
        System.out.println("打工人");
    }
}

class Manger extends Employee {
    public Manger() {}
    public Manger(String name, int year, double salary) {
        this.name = name;
        this.year = year;
        this.salary = salary;
    }

    @Override
    public double addSalary() {
        return (salary*1.2)+(year*200)-salary;
    }
    public void work() {
        System.out.println("白领");
    }
}